package com.dt76.smallloanbackendservice.controller.yaozhao;

import com.dt76.smallloanbackendservice.service.yaozhao.OverDueService;
import com.dt76.smallloanbackendservice.utils.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/overdue")
public class OverDueController {

    @Autowired
    private OverDueService overDueService;

    @RequestMapping("/qryPageAll")
    public Page qryPageAll(@RequestParam("pageIndex") int pageIndex,
                           @RequestParam("userName") String userName,
                           @RequestParam("phoneNumber") String phoneNumber,
                           @RequestParam("loanId") String loanId,
                           @RequestParam("ContractId") String ContractId,
                           @RequestParam("riskClassification")String riskClassification){
        System.out.println("成功调用远程服务:OverDueService>qryPageAll>>>");
        return overDueService.qryPageAll(pageIndex,userName,phoneNumber,loanId,ContractId,riskClassification);
    }

    @RequestMapping("/qryCollectionPageAll")
    public Page qryCollectionPageAll(@RequestParam("pageIndex") int pageIndex,
                           @RequestParam("userName") String userName,
                           @RequestParam("phoneNumber") String phoneNumber,
                           @RequestParam("loanId") String loanId,
                           @RequestParam("CollectionType") String CollectionType){
        System.out.println("成功调用远程服务:OverDueService>qryCollectionPageAll>>>");
        return overDueService.qryCollectionPageAll(pageIndex,userName,phoneNumber,loanId,CollectionType);
    }

}
